package com.ruoyi.accounting.domain.dto;

import com.ruoyi.accounting.enums.AccountTypeEnum;
import com.ruoyi.common.core.enums.YesOrNoEnum;
import com.ruoyi.accounting.validator.annotation.EnumValidator;
import com.ruoyi.accounting.validator.annotation.ExistBookId;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 账户对象 acc_account
 *
 * @author ruoyi
 * @date 2025-07-13
 */
@Data
public class AccAccountDTO extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    /**
     * 账本id
     */
    @NotNull(message = "账本不能为空")
    @ExistBookId
    private Long accountBookId;
    /**
     * 账户名称
     */
    @NotBlank(message = "账户名称不能为空")
    private String accountName;

    /**
     * 账户类型
     */
    @EnumValidator(enumClass = AccountTypeEnum.class, message = "账户类型错误")
    private Integer accountType;

    /**
     * 图标链接
     */
    @NotBlank(message = "图标链接不能为空")
    private String iconUrl;

    /**
     * 币种id
     */
    @NotNull(message = "币种不能为空")
    private Long currencyId;

    /**
     * 余额
     */
    @NotNull(message = "余额不能为空")
    private BigDecimal balance;

    /**
     * 是否计入资产
     */
    @NotNull(message = "是否计入资产不能为空")
    @EnumValidator(enumClass = YesOrNoEnum.class, message = "是否计入资产错误")
    private Integer includeAssets;

    /**
     * 是否隐藏
     */
    @NotNull(message = "是否隐藏不能为空")
    @EnumValidator(enumClass = YesOrNoEnum.class, message = "是否隐藏错误")
    private Integer hidden;

    /**
     * 父账户id
     */
    private Long parentAccountId;

    /**
     * 发卡行
     */
    private String cardBank;

    /**
     * 卡号后四位
     */
    private String cardLastCode;

    /**
     * 账单日
     */
    private Long billingDate;

    /**
     * 还款日
     */
    private Long repaymentDate;

    /**
     * 是否删除
     */
    private Integer delFlag;


}
